package 随机数发生器;

import java.util.Random;

/**
 * Created by hest0 on 2017/4/23.
 */
public class 产生随机数 {
    public static void main(String[] args) {
        /**
         * 产生最大值到最小值之间的随机数
         */
        Random random = new Random();
        int maax = 20;
        int min = 10;
        int a = random.nextInt(maax) % (maax - min + 1) + min;
        System.out.println(a);
    }
}
